package SpLib.std
{	
	public class stack
	{
		private var m_Stack:Array = new Array;
		
		public function stack()
		{
		}

		public function size():int
		{
			return m_Stack.length;
		}
		
		public function empty():Boolean
		{
			return m_Stack.length==0;
		}
		
		public function clear():void
		{
			m_Stack.length = 0;	
		}
		
		public function push(data:*):void
		{
			m_Stack.push(data);
		}
		
		public function pop():*
		{
			if(m_Stack.length==0)
			{
				return null;
			}
			
			return m_Stack.pop();
		}
	}
}